@import 'mixins/function.scss';

/* 防止页面切换时，滚动条高度不变的问题（滚动条高度非滚动条滚动高度）
------------------------------- */
.el-scrollbar {
	overflow: hidden;
	position: relative;
	height: 100%;
}
.el-scrollbar__wrap {
	overflow: auto !important;
	overflow-x: hidden !important;
	max-height: 100%; /*防止页面切换时，滚动条高度不变的问题（滚动条高度非滚动条滚动高度）*/
}
.el-select-dropdown .el-scrollbar__wrap {
	overflow-x: scroll !important;
}
.el-select-dropdown__wrap {
	max-height: 274px !important; /*修复Select 选择器高度问题*/
}
.el-autocomplete-suggestion__wrap {
	max-height: 280px !important;
}

/* Button 按钮
------------------------------- */
// 第三方字体图标大小
.el-button i.iconfont,
.el-button i.fa {
	font-size: 14px !important;
	margin-right: 5px;
}
.el-button--medium i.iconfont,
.el-button--medium i.fa {
	font-size: 14px !important;
	margin-right: 5px;
}
.el-button--small i.iconfont,
.el-button--small i.fa {
	font-size: 12px !important;
	margin-right: 5px;
}
.el-button--mini i.iconfont,
.el-button--mini i.fa {
	font-size: 13px !important;
	margin-right: 0;
}

/* Drawer 抽屉
------------------------------- */
.el-drawer__header {
	margin-bottom: 0 !important;
	padding: 14px 15px !important;
	border-bottom: 1px solid #ebeef5;
	color: #333333 !important;
}
.el-drawer__body {
	width: 100%;
	height: 100%;
	overflow: auto;
}

/* Dialog 对话框
------------------------------- */
.el-dialog__headerbtn:focus .el-dialog__close,
.el-dialog__headerbtn:hover .el-dialog__close {
	color: set-color(primary);
}
.el-overlay {
	display: flex;
	align-items: center;
	justify-content: center;
	.el-dialog {
		margin: 0 auto !important;
		.el-dialog__body {
			padding: 20px !important;
		}
	}
}
.el-dialog__body {
	max-height: calc(90vh - 111px) !important;
	overflow-y: auto;
	overflow-x: hidden;
}

/* Divider 分割线
------------------------------- */
.el-divider {
	background-color: rgba(0, 0, 0, 0.06) !important;
}

/* Card 卡片
------------------------------- */
.el-card__header {
	padding: 15px 20px;
}

/* Message 消息提示
------------------------------- */
.el-message {
	min-width: auto !important;
	box-sizing: border-box !important;
	border-width: 1px !important;
	border-style: solid !important;
	border-color: #ebeef5 !important;
	box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
	background-color: #fff !important;
	border-radius: 3px !important;
	border: 1px solid #ebeef5 !important;
	.el-message__icon {
		font-size: 1.4em !important;
	}
}

/* Alert 警告
------------------------------- */
.el-alert--warning.is-light {
	border: 1px solid rgba(230, 162, 60, 0.3) !important;
}
.el-alert--success.is-light {
	border: 1px solid rgba(103, 194, 58, 0.3) !important;
}
.el-alert--info.is-light {
	border: 1px solid rgba(144, 147, 153, 0.3) !important;
}
.el-alert--error.is-light {
	border: 1px solid rgba(245, 108, 108, 0.3) !important;
}

/* Table 表格
------------------------------- */
.el-table-column--selection {
	.el-checkbox {
		margin-right: unset !important;
	}
}
.el-table::before,
.el-table--group::after,
.el-table--border::after {
	z-index: 99 !important;
}

/* 下拉选择器/时间选择器滚动条
------------------------------- */
.el-select-dropdown .el-scrollbar__wrap,
.el-picker-panel .el-scrollbar__wrap {
	overflow-x: scroll !important;
}

/* NavMenu 导航菜单
------------------------------- */
// 默认样式修改
.el-menu {
	border-right: none !important;
}
.el-menu-item,
.el-submenu__title {
	height: 50px !important;
	line-height: 50px !important;
	color: var(--bg-menuBarColor) !important;
	transition: none !important;
}
// horizontal 水平方向时
.el-menu--horizontal > .el-menu-item.is-active,
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
	border-bottom: 3px solid !important;
	border-bottom-color: set-color(primary) !important;
	color: set-color(primary) !important;
}
.el-menu--horizontal .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-submenu:focus .el-submenu__title,
.el-menu--horizontal > .el-submenu:hover .el-submenu__title,
.el-menu--horizontal .el-menu .el-menu-item.is-active,
.el-menu--horizontal .el-menu .el-submenu.is-active > .el-submenu__title {
	color: set-color(primary) !important;
}
.el-menu.el-menu--horizontal {
	border-bottom: none !important;
}
.el-menu--horizontal > .el-menu-item,
.el-menu--horizontal > .el-submenu .el-submenu__title {
	color: var(--bg-topBarColor) !important;
}
// 外部链接时
.el-menu-item a,
.el-menu-item a:hover,
.el-menu-item i,
.el-submenu__title i {
	color: inherit;
	text-decoration: none;
}
.el-menu-item a {
	width: 86%;
	display: inline-block;
}
// 默认 hover 时
.el-menu-item:hover,
.el-submenu__title:hover {
	color: set-color(primary) !important;
	background-color: transparent !important;
	i {
		color: set-color(primary) !important;
	}
}
// 高亮时
.el-menu-item.is-active {
	color: set-color(primary) !important;
}
.el-active-extend {
	color: #ffffff !important;
	background-color: set-color(primary) !important;
	i {
		color: #ffffff !important;
	}
}
#add-is-active {
	@extend .el-active-extend;
	&:hover {
		@extend .el-active-extend;
	}
}
// 菜单收起时且是a链接
.is-dark a {
	color: #ffffff !important;
	text-decoration: none;
}
// 菜单收起时鼠标经过背景颜色/字体颜色
.el-menu--vertical {
	background: var(--bg-menuBar) !important;
}
.el-menu--horizontal {
	.el-menu {
		background: var(--bg-topBar) !important;
	}
	.el-menu-item,
	.el-submenu__title {
		color: var(--bg-topBarColor);
	}
}
// 第三方图标字体间距/大小设置
.el-menu-item .iconfont,
.el-submenu .iconfont,
.el-menu-item .fa,
.el-submenu__title .fa {
	font-size: 14px !important;
	display: inline-block;
	vertical-align: middle;
	margin-right: 5px;
	width: 24px;
	text-align: center;
}
// element plus 本身字体图标
.el-submenu [class^='el-icon-'],
.el-menu-item [class^='el-icon-'] {
	font-size: 14px !important;
}
// 去掉离开浏览器时，菜单的默认高亮
.el-menu-item:focus {
	background-color: transparent !important;
}

/* Breadcrumb 面包屑
------------------------------- */
.el-breadcrumb__inner a,
.el-breadcrumb__inner.is-link {
	font-weight: normal;
	color: var(--bg-topBarColor);
}

/* Alert 警告
------------------------------- */
.el-alert__title {
	word-break: break-all;
}
